package com.iqik.sc.service;

import com.iqik.sc.service.impl.ResumeServiceFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

// 声明当前类是一个Feign客户端， value指定该客户端要请求的服务名称（登记到注册中心上的服务提供者的服务名称）
@FeignClient(value = "service-resume", fallback = ResumeServiceFeignClientFallback.class, path = "/resume")
//@RequestMapping("/resume")
public interface ResumeServiceFeignClient {

    // feign 要做的事情就是拼装url
    @GetMapping("/openstate/{userId}")
    public Integer findDefaultResumeState(@PathVariable("userId") Long userId);

}
